package com.example.demo.utils;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class MdUtil {
    /*
    * 创建并写入Markdown文件
    * @param content 文件内容，即要写入Markdown 格式广西文件
    * @param fileName 要创建的Markdown文件名
    *
    *
    *
     */
     public static void createAndWriteMarkdownFile(String content, String fileName) {
       try (BufferedWriter writer = new BufferedWriter(new FileWriter(new File(fileName)))){
           writer.write(content);
           System.out.println("Markdown文件创建成功！"+fileName);

       } catch (IOException e) {
           throw new RuntimeException(e);
       }
     }
}
